import React from 'react'

class Child extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            count: 0
        }
    }
    componentWillMount(){
        console.log('Will Mount')
    }

    componentDidMount(){
        console.log('did Mount');
    }

    componentWillReceiveProps(newProps){
        console.log('will props'+ newProps.name)
    }

    shouldComponentUpdate(){
        console.log('should update')
        return true
    }

    componentWillUpdate(){
        console.log('will update')
    }

    componentDidUpdate(){
        console.log('did update')
    }

    render() {
        return (
            <div>
                <p>{this.props.name}</p>
            </div>
        )
    }
}

export default Child
